package com.lancoo.lancooknowledgecourseware;

import com.lancoo.klgcourseware.entity.KlgApiResponse;

import io.reactivex.Observable;
import com.lancoo.lancooknowledgecourseware.entity.CloudPlatformConfigModel;
import com.lancoo.lancooknowledgecourseware.entity.ConditionData;
import com.lancoo.lancooknowledgecourseware.entity.Responce;
import com.lancoo.lancooknowledgecourseware.entity.VersionContr;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by pengmi on 2018/12/13.
 * Description:
 */

public interface VersionApi {

    @GET("api/Version/GetApkVersion")
    Observable<Responce<VersionContr>> getApkVersion();

    @POST("api/Version/ChangeApkVersion")
    Observable<Responce<Integer>> changeApkVersion(@Body VersionContr versionContr);

    @GET("DebrisPublicWeb.asmx/WS_Get_SubjectKlgByCondition")
    Observable<KlgApiResponse<ConditionData>> getKlgs(
            @Query("SubjectCode") String SubjectCode,
            @Query("VersionCode") String VersionCode,
            @Query("TypeName") String TypeName,
            @Query("PageIndex") int PageIndex,
            @Query("PageSize") int PageSize
    );

    @GET("Base/WS/Service_Basic.asmx/WS_G_GetSubSystemServerInfoForAllSubject")
    Observable<CloudPlatformConfigModel> getSystemServer(@Query("sysID") String sysId);
}
